package com.chenfan.filestore.service;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.chenfan.filestore.dto.TaskQueryDTO;
import com.chenfan.filestore.model.Task;
import org.apache.ibatis.session.ResultHandler;

import java.util.List;

/**
 * 任务表(Task)表服务接口
 *
 * @author Leo
 * @since 2023-04-27 11:46:11
 */
public interface TaskService extends IService<Task> {
    Page<Task> page(TaskQueryDTO query);

    @InterceptorIgnore(tenantLine = "true")
    Long findByCount(String sql);

    @InterceptorIgnore(tenantLine = "true")
    void findByBatch(String sql, ResultHandler handler);


    List<Task> listBySize(Integer size);

    List<Task> listByExpireDays(Integer expireDays);

    Task queryLasteast(Task query);

}

